package org.computumus.core.jdo;

import javax.jdo.annotations.*;

/**
 * Created by IntelliJ IDEA.
 * User: planadecu
 * Date: 25 juin 2010
 * Time: 20:40:48
 * To change this template use File | Settings | File Templates.
 */
 @PersistenceCapable(identityType = IdentityType.APPLICATION)
public class ScriptContainer {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

    @Persistent(serialized = "true")    
    private Script script;

    public ScriptContainer(Long id, Script script) {
        this.id = id;
        this.script = script;
    }

    public ScriptContainer(byte[] code) {
        this.script = new Script(code);
    }

    public Long getId() {
        return id;
    }

    public Script getScript(){
        return script;
    }

}
